package com.fpd.model.vo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fpd.enums.LetterTypeEnum;
import com.fpd.model.bean.Logistics;
import com.fpd.tools.AgeUtil;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @desc
 * @author wujiangbo
 * @date 2019年11月28日 下午3:55:53
 */
@Data
@ApiModel(description = "快递信息模型")
public class PostBaseInfoVO implements Serializable {

	private static final long serialVersionUID = 7245799361936778518L;
	@ApiModelProperty(value = "主键ID(与业务无关)", example = "新增不填")
	private String id;

	@ApiModelProperty(value = "快件号", example = "")
	private String billNo;

	@ApiModelProperty(value = "配货单号", example = "")
	private String distributionNumber;// 配货单号

	@ApiModelProperty(value = "客户订单号", example = "")
	private String custOrderNumber;// 客户订单号（对应EMS系统中"邮件数据唯一标识bigAccountDataId"字段）
	
	@ApiModelProperty(value = "客服ID", example = "")
	private String sendUserId;

	@ApiModelProperty(value = "寄件人姓名", example = "")
	private String senderName;

	@ApiModelProperty(value = "寄件电话", example = "")
	private String senderPhone;

	@ApiModelProperty(value = "寄件电话2", example = "")
	private String senderPhone2;

	@ApiModelProperty(value = "寄件人地址", example = "")
	private String senderAddress;

	@ApiModelProperty(value = "寄件人公司", example = "")
	private String senderCompany;

	private String senderProvince;

	private String senderCity;

	private String senderCounty;

	private String senderPostcode;

	@ApiModelProperty(value = "收件人姓名", example = "")
	private String receiveName;

	@ApiModelProperty(value = "收件人电话", example = "")
	private String receivePhone;

	@ApiModelProperty(value = "收件人电话2", example = "")
	private String receivePhone2;

	@ApiModelProperty(value = "收件人地址", example = "")
	private String receiveAddress;

	private String receiveCompany;

	private String receivePostcode;

	private String receiveProvince;

	private String receiveCity;

	private String receiveCounty;

	@ApiModelProperty(value = "客户号", example = "")
	private String custNo;
	
	private String custName;
	
	private String custIdNumber;

	@ApiModelProperty(value = "一级分类状态码", example = "")
	private String code;

	@ApiModelProperty(value = "二级分类状态码", example = "")
	private String code2;

	@ApiModelProperty(value = "一级分类状态码描述", example = "")
	private String codeDesc;

	@ApiModelProperty(value = "二级分类状态码描述", example = "")
	private String code2Desc;

	private String filePath;

	@ApiModelProperty(value = "是否已下载（0：未下载；1：已下载）", example = "")
	private Integer isDownload;

	@ApiModelProperty(value = "委托方名称", example = "")
	private String entrustName;

	@ApiModelProperty(value = "提交客服姓名", example = "")
	private String truename;

	@ApiModelProperty(value = "客服ID", example = "")
	private String userId;

	@ApiModelProperty(value = "组ID", example = "", hidden = false)
	private String groupId;

	@ApiModelProperty(value = "组名称", example = "", hidden = false)
	private String groupName;

	@ApiModelProperty(value = "留案状态(0：默认，1：审核中)", example = "", hidden = false)
	private String leaveState;

	@ApiModelProperty(value = "留案次数", example = "", hidden = false)
	private String leaveCount;

	@ApiModelProperty(value = "委案日期", example = "")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date beginTimeCase;

	@ApiModelProperty(value = "提交日期", example = "")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date createTime;
	
	private String postDate;

	private int age;
	
	@ApiModelProperty(value = "年龄段", example = "", hidden = false)
	private int agePart;
	@ApiModelProperty(value = "年龄段", example = "", hidden = false)
	private String agePartStr;

	@ApiModelProperty(value = "逾期天数", example = "", hidden = false)
	private int yuqiDay;

	@ApiModelProperty(value = "客服当日发函量", example = "", hidden = false)
	private int sendEmsCount;

	@ApiModelProperty(value = "逾期金额", example = "", hidden = false)
	private BigDecimal yuqiAmount;

	private List<Logistics> logisticsList;

	@ApiModelProperty(value = "逾期天数开始", example = "", hidden = false)
	private int yuqiDayBegin;

	@ApiModelProperty(value = "逾期天数结束", example = "", hidden = false)
	private int yuqiDayEnd;

	@ApiModelProperty(value = "逾期金额开始", example = "", hidden = false)
	private BigDecimal yuqiAmountBegin;

	@ApiModelProperty(value = "逾期金额结束", example = "", hidden = false)
	private BigDecimal yuqiAmountEnd;

	@ApiModelProperty(value = "组长审核状态（0：未审核；1：已通过 2 驳回）", hidden = false, example = "")
	private int checkState;

	@ApiModelProperty(value = "提交客服名称")
	private String trueName;
	
    //函件类型 1代表 普通件  2代表密保件
    private String letterType;
    
    //撤销状态 1为撤销 默认0
    private String cancelStatus; 
    
    private String letterTypeName;
    
    private String contractValidTime;//合同时间
    
    private String caseId;//产品名称
    
    private String downloadTime; //下载时间
    
    private String productName;//产品名称
    
    private String addressType2;//发函地址类型

	public String getLetterTypeName() {
		return LetterTypeEnum.getNameByValue(this.letterType);
	}
    
	public String getAgePartStr() {
		return AgeUtil.getByAge(this.age);
	}
}

